import React from 'react'
import './style.less'
import { useNavigate } from 'umi'
import { NavBar } from 'antd-mobile'
export default function CommonHead(props: {title: string}) {
  const navigate = useNavigate();
  const back = () => {
    navigate(-1)
  }
  return (
    <div className="navbar">
      <NavBar onBack={back}>{props.title}</NavBar>
    </div>
  )
}
